// pages/mine/mine-evpi/mine-evpi.js
var app = getApp();
Page({

  /**
   * 页面的初始数据
   */
  data: {
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var that = this;
    that.setData({
      uid:options.uid,
      rank_img: options.rank_img,
      rank: options.rank,
      is_bee: options.is_bee
    })
    wx.showLoading({
      title: '加载中...',
    })
     wx.request({
       url: app.globalData.phpUrl + 'user/api',
       method:'POST',
       data: { api_name: 'info_question', openid: app.globalData.userData.openOId},
       success:function(d){
         that.setData({ userData: d.data.data, userInfo:app.globalData.userInfo});
         console.log(d.data.data);
         wx.hideLoading()
       }
     });

  },
 
  fillData:function(e){
    var that = this;
    wx.navigateTo({
      url: '../fillData/fillData?id=' + e.currentTarget.dataset.id + '&uid=' + that.data.uid + '&rank_img=' + that.data.rank_img + '&rank=' + that.data.rank + '&is_bee=' + that.data.is_bee,
    })
  },

  noLevel:function(){
    wx.showToast({
      title: '您当前等级还不允许此此操作!',
      icon: 'none',
      duration: 2000,
    });
  }
   ,
  no_bee:function(){
    wx.showToast({
      title: '你还不是蜜蜂会员，请关注公众号成为会员!',
      icon: 'none',
      duration: 2000,
    });
  }
  
})